<div class="toggle-box" [ngStyle]="{'background-color': state?color:''}">
  <div class="toggle-inner" [ngClass]="{'on':state,'off':!state}"></div>
</div>